package com.laikan.library.components.dialog;

import android.content.Context;

/**
 * Created by anrun on 8/24/16.
 */
public class LoadingMgr {
    private static LoadingMgr mInstance;
    LoadingDialog mLoadingDialog;

    private LoadingMgr(Context context) {

        mLoadingDialog = new LoadingDialog(context);
    }

    public static LoadingMgr getInstance(Context context) {

        if(mInstance == null) {
            mInstance = new LoadingMgr(context);
        }
        return mInstance;
    }

    public void showLoading(){
        mLoadingDialog.show();
    }

    public void cancleLoading(){
        mLoadingDialog.dismiss();
    }
}
